<script>

	function confirma() {
		
		return confirm('Confirma criação da agenda?');
	}
	
</script>

<?php

	$this->Html->script(array('jquery.maskedinput-1.2.2.min','maskinput','jquery.ui.datepicker-pt-BR','datepicker'), false);
	
	echo '<fieldset><legend>Dados</legend>';
	echo $this->Form->create('Agenda', array('onsubmit' => 'return confirma();'));
	echo $this->Form->input('data_inicial', array('label' => __('Data Inicial'), 'type' => 'text', 'class' => 'maskdata data'));
	echo $this->Form->input('data_final', array('label' => __('Data Final'), 'type' => 'text', 'class' => 'maskdata data'));
	echo $this->Form->input('medico_id', array('label' => __('Médico'), 'type' => 'select', 'options' => $medicos, 'empty' => 'Selecione...'));
	echo '<div class="botoes_form">';
	echo $this->Form->button('Criar', array('type' => 'submit'));
	echo '</div>'; 
	echo $this->Form->end();
	echo '</fieldset>';